/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kom;

import kom.GameTimer.GameTimer;
import kom.gui.interfaces.WindowControl;
import kom.level.Level;

/**
 *
 * @author Ziden
 */
// this class will handle it ALL thro commands
// its aways good to have a console ^^
public class Console {

    // console has the level so he can handle commands to do strange things
    private static Level level;
    public static GameTimer timer = new GameTimer();
    public static WindowControl windows = new WindowControl();

    // 90% of the commands sent to console, will be automatic commands sent by button clicks
    public static void handleCommand(String command) {
        
        if(command.equalsIgnoreCase("openinv")) {
            if(!windows.isWindowActive("inventory"))
                windows.activateWindow("inventory");
            else
                windows.deactivateWindow("inventory");
        }
        
    }

    public static Level getLevel() {
        return level;
    }

    public static void setLevel(Level level) {
        Console.level = level;
    }
}
